<?php $this->load->view(TEMPLATE_NAME.'/front/header');?>
<?php $this->load->view(TEMPLATE_NAME.'/admin/side_left');?>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<script type="text/javascript" src="<?php echo base_url(); ?>fancybox/jquery.fancybox-1.3.1.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery.validate.pack.js"></script>
<script type="text/javascript">       
    $(document).ready(function(){
        /* jquery validation */
        //custom validation rule - username not equal with 'Your e-mail address'
	     
        $('#pass').hide();    
        $("#login_details").validate({
            rules: {
                username: "required",
                firstname: "required",
                surname: "required",
                email: "required",
                
                password : {                   
                    minlength: 6    
                },
                passconf : {                         
                    minlength: 6,   
					equalTo: "#password"
                },                
               
            },
            messages: {
                username: "Please enter your Username",
                firstname : "Please enter your Password",
                surname: "Please enter your Surname",
                email: "Please enter your E-mail",  
				password: { 
					minlength: "Your password must be at least 6 characters long"
				},
				passconf: { 
					minlength: "Your password must be at least 6 characters long",
					equalTo: "Please enter the same password as above"
				}                 
            } 
        });
	     
        
        /* end jquery validation */
    });
</script>
<div class="page noright adminpage adminuser">
    
    <?php $this->load->view(TEMPLATE_NAME.'/admin/profile/profile_tabs');?>
            <h2 class="no">Facebook Connect</h2>
            
            <p class="black f13"><strong>Connect you account to facebook account. to post your status update</strong></p>
            
            <hr />
    <?php if ($me): ?>
    <a href="<?php echo $logoutUrl; ?>">
      <img src="http://static.ak.fbcdn.net/rsrc.php/z2Y31/hash/cxrz4k7j.gif">
    </a>
    <?php else: ?>

      <a href="<?php echo $loginUrl; ?>">
        <img src="http://static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif">
      </a>
    <?php endif; ?>
	    <br/>
    <?php if ($me): ?>

    <h3>Connected as</h3>
    <img src="https://graph.facebook.com/<?php echo $uid; ?>/picture">
	    <br/>
    <?php echo $me['name']; ?>

    <h3>Your Facebook link</h3>
    <a target="_blank" href="<?php echo $me['link']; ?>"><?php echo $me['link']; ?></a>
    <?php else: ?>
    <strong><em>You are not Connected.</em></strong>
    <?php endif ?>

<?php $this->load->view(TEMPLATE_NAME.'/front/footer_menu');?>
</div><!-- page -->


<?php $this->load->view(TEMPLATE_NAME.'/front/footer');?>
